
/**
 * Binds a scope to a function in order to keep the current scope used.
 * @param {Object} scope The scope to bind.
 */
Function.prototype.bind = function(scope) {
  var _function = this;
  
  return function() {
    return _function.apply(scope, arguments);
  }
}


/**
 * return {boolean} Whether touch is enabled.
 */
function isTouchDevice() {
  return 'ontouchstart' in window;
}